# -*- coding: utf-8 -*-

from usuarios.decorators import login_required, permission_required, superuser_required

def make_direct_to_template(action):
    @permission_required(action)
    def _direct_to_template(*args, **kwargs):
        from django.views.generic.simple import direct_to_template
        return direct_to_template(*args, **kwargs)
    return _direct_to_template


def make_gridcrud_run(action):
    @permission_required(action)
    def _gridcrud_run(*args, **kwargs):
        from vialink.django.gridcrud import run
        return run(*args, **kwargs)
    return _gridcrud_run

